﻿<%@ Page Language="VB" MasterPageFile="~/WebForm/MasterPage.master" AutoEventWireup="false"
    CodeFile="ManageRole.aspx.vb" Inherits="WebForm_ManageRole" %>

<%@ Register Src="~/WebForm/ManageRole/SearchRoleOrganizationMappingByRole.ascx" TagName="SearchRoleOrganizationMappingByRole"
    TagPrefix="My" %>
<%@ Register Src="~/WebForm/ManageRole/SearchRoleProgramMappingByRole.ascx" TagName="SearchRoleProgramMappingByRole"
    TagPrefix="My" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="95%" align="center">
        <tr>
            <td>
                <fieldset>
                    <legend>
                        <asp:Label ID="Section1" SkinID="section" runat="server" meta:resourcekey="Section1"></asp:Label>
                    </legend>
                    <table>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblParent" runat="server" meta:resourcekey="lblParent"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlParent" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblRoleName" runat="server" meta:resourcekey="lblRoleName"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtRoleName" runat="server"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Button ID="btnAdd" runat="server" meta:resourcekey="btnAdd" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td>
                <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional">
                    <triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnAdd" />
                    </triggers>
                    <contenttemplate>
                <My:MyGridView ID="gv" SkinID="pager" runat="server" HorizontalAlign="center" DataKeyNames="RoleID" DataNames="Builtin"
                    AllowHoverSelect="False" meta:resourcekey="gv" AllowSorting="true" MySortExpression="RoleName">
                    <Columns>
                        <asp:CommandField ShowEditButton="true" />
                        <asp:BoundField DataField="ParentRoleName" meta:resourcekey="bfParentRoleName" ReadOnly="true" SortExpression="ParentRoleName" />
                        <asp:BoundField DataField="RoleName" meta:resourcekey="bfRoleName" SortExpression="RoleName" />
                        <asp:BoundField DataField="RoleDescription" meta:resourcekey="bfRoleDescription" SortExpression="RoleDescription" />
                        <asp:TemplateField meta:resourcekey="bfActive" ItemStyle-HorizontalAlign="center">
                            <edititemtemplate>
                                <asp:CheckBox ID="chkActive" runat="server" ></asp:CheckBox>
                            </edititemtemplate>
                            <itemtemplate>
                                <asp:CheckBox ID="chkActive" runat="server" Enabled="false"></asp:CheckBox>
                            </itemtemplate>
                        </asp:TemplateField>
                        <asp:TemplateField meta:resourcekey="bfRoleUserMapping" ItemStyle-HorizontalAlign="center"
                            Visible="false">
                            <edititemtemplate>
                            </edititemtemplate>
                            <itemtemplate>
                                <asp:Button ID="btnRoleUserMapping" runat="server" meta:resourcekey="btnRoleUserMapping" CommandName="btnRoleUserMapping"></asp:Button>
                            </itemtemplate>
                        </asp:TemplateField>
                        <asp:TemplateField meta:resourcekey="bfRoleOrganizationMapping" ItemStyle-HorizontalAlign="center">
                            <edititemtemplate>
                            </edititemtemplate>
                            <itemtemplate>
                                <asp:Button ID="btnRoleOrganizationMapping" runat="server" meta:resourcekey="btnRoleOrganizationMapping" CommandName="btnRoleOrganizationMapping"></asp:Button>
                            </itemtemplate>
                        </asp:TemplateField>
                        <asp:TemplateField meta:resourcekey="bfRoleProgramMapping" ItemStyle-HorizontalAlign="center">
                            <edititemtemplate>
                            </edititemtemplate>
                            <itemtemplate>
                                <asp:Button ID="btnRoleProgramMapping" runat="server" meta:resourcekey="btnRoleProgramMapping" CommandName="btnRoleProgramMapping"></asp:Button>
                            </itemtemplate>
                        </asp:TemplateField>
<%--                        <asp:TemplateField HeaderText="排序">
                            <itemtemplate>
                                            <My:AdjustSequence ID="AdjustSequence1" runat="server" Sequence='<%# Bind("Sequence") %>'
                                                LastSequence='<%# TryCast(Me.gv.DataSource,Data.DataTable).Rows.Count %>' />
                                        </itemtemplate>
                        </asp:TemplateField>--%>
                    </Columns>
                </My:MyGridView>
                <%--<My:SearchRoleUserMappingByRole ID="SearchRoleUserMappingByRole1" runat="server" />--%>
                <My:SearchRoleOrganizationMappingByRole ID="SearchRoleOrganizationMappingByRole1"
                    runat="server" />
                <My:SearchRoleProgramMappingByRole ID="SearchRoleProgramMappingByRole1" runat="server" />
                </contenttemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>
